package com.gxa.common;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @program: erp
 * @description: 接受分页工具类（含对象）
 * @author: LC
 * @create: 2021-12-02 16:46
 */

@ApiModel("后端接受的分页对象")
public class PageRecv<T>{
    //当前页码
    @ApiModelProperty(name = "currentPage",notes = "当前页",dataType = "Integer",required = false)
    private int currentPage;
    //每页行数
    @ApiModelProperty(name = "pageSize",notes = "每页行数",dataType = "Integer",required = false)
    private int pageSize;

    @ApiModelProperty(name = "orderField",notes = "排序字段名",dataType = "String",required = false)
    private String orderField;

    @ApiModelProperty(name = "orderRule",notes = "排序规则：1(升序),2(降序)",dataType = "Integer",required = false)
    private Integer orderRule;
    //接受数据
    @ApiModelProperty(name = "data",notes = "数据",dataType = "obj",required = false)
    private T data;

    public String getOrderField() {
        return orderField;
    }

    public void setOrderField(String orderField) {
        this.orderField = orderField;
    }

    public Integer getOrderRule() {
        return orderRule;
    }

    public void setOrderRule(Integer orderRule) {
        this.orderRule = orderRule;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "PageRecv{" +
                "currentPage=" + currentPage +
                ", pageSize=" + pageSize +
                ", data=" + data +
                '}';
    }
}